//map 数据结构
const obj = {};
obj[true] = "value1";
obj[111] = "value2";
obj[{ a: 1 }] = "value3";
console.log(Object.keys(obj)); //[ '111', 'true', '[object Object]' ]
console.log(obj[true]); //value1
console.log(obj[{}]); //value3
console.log(obj["[object Object]"]); //value3

const m = new Map();
const tom = { name: "tom" };
m.set(tom, 90);
console.log(m); //Map { { name: 'tom' } => 90 }
console.log(m.get(tom)); //90
// m.has();
// m.delete();
// m.clear();
m.forEach((value, key) => {
  console.log(value, key); //90 { name: 'tom' }
});
